﻿namespace LxCore
{
    public enum StatisticTypes
    {
        //10000~19999通过体统计
        VolumnAverage = 10001, VolumIntegral, Mass, MassAverage, MassIntegral,

        //20000~29999可使用体统计或面统计
        Max = 20001, Min, Mean, Sum,

        //30000~39999通过面统计
        AreaAverage = 30001, AreaIntegral, MassFlux, MassFluxAverage, MassFluxIntegral,

        //
        CostTime=40001,
    }
    public static class StatisticTypeHelper
    {
        public static (bool isCellAvaliable,bool isFaceAvaliable) GetAvaliablity(StatisticTypes statisticType)
        {
            switch (statisticType)
            {
                case StatisticTypes.Max:
                case StatisticTypes.Min:
                case StatisticTypes.Mean:
                case StatisticTypes.Sum:
                    return (true, true);
                case StatisticTypes.VolumnAverage:
                case StatisticTypes.VolumIntegral:
                case StatisticTypes.Mass:
                case StatisticTypes.MassAverage:
                case StatisticTypes.MassIntegral:
                    return (true, false);
                case StatisticTypes.AreaAverage:
                case StatisticTypes.AreaIntegral:
                case StatisticTypes.MassFlux:
                case StatisticTypes.MassFluxAverage:
                case StatisticTypes.MassFluxIntegral:
                    return (false, true);
                default:
                    return (false, false); 
            }
        }
    }
}

